<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateModsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mods', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->nullable()->comment('用户id');
            $table->char('name',15)->comment('模块名称');
            $table->char('flag',15)->comment('模块标识');
            $table->char('src_url')->comment('模块地址');
            $table->char('info_url')->nullable()->comment('介绍地址');
            $table->string('info')->nullable()->comment('模块介绍');
            $table->integer('price')->nullable()->comment('价格/月');
            $table->tinyInteger('status')->nullable()->comment('状态：0待审核，1通过，-1拒绝');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mods');
    }
}
